package com.jkt.rms.business.base;

import java.io.Serializable;
import java.sql.Timestamp;


/**
 * This is an object that contains data related to the RateAuditTrans table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="RateAuditTrans"
 */
public abstract class BaseRateAuditTrans  implements Serializable {

	public static String PROPAUDITDATE = "auditDate";
	public static String PROPROLECODE = "roleCode";
	public static String PROPID = "id";
	public static String PROPLOCATIONCODE = "locationCode";
	public static String PROPVENDORCODE = "vendorCode";
	public static String PROPRATE = "Rate";


	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private int id;

	// fields
	private String roleCode;
	private String vendorCode;
	private float rate;
	private String locationCode;
	private Timestamp auditDate;


	// constructors
	public BaseRateAuditTrans () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseRateAuditTrans (int id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseRateAuditTrans (
		int id,
		String roleCode,
		String vendorCode,
		float rate,
		String locationCode,
		Timestamp auditDate) {

		this.setId(id);
		this.setRoleCode(roleCode);
		this.setVendorCode(vendorCode);
		this.setRate(rate);
		this.setLocationCode(locationCode);
		this.setAuditDate(auditDate);
		initialize();
	}

	protected void initialize () {}



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="rateaudittransid"
     */
	public int getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (int id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}


	/**
	 * Return the value associated with the column: rolecode
	 */
	public String getRoleCode () {
		return roleCode;
	}

	/**
	 * Set the value related to the column: rolecode
	 * @param roleCode the rolecode value
	 */
	public void setRoleCode (String roleCode) {
		this.roleCode = roleCode;
	}


	/**
	 * Return the value associated with the column: Vendorcode
	 */
	public String getVendorCode () {
		return vendorCode;
	}

	/**
	 * Set the value related to the column: Vendorcode
	 * @param vendorCode the Vendorcode value
	 */
	public void setVendorCode (String vendorCode) {
		this.vendorCode = vendorCode;
	}


	/**
	 * Return the value associated with the column: rate
	 */
	public float getRate () {
		return rate;
	}

	/**
	 * Set the value related to the column: rate
	 * @param rate the rate value
	 */
	public void setRate (float rate) {
		this.rate = rate;
	}


	/**
	 * Return the value associated with the column: locationcode
	 */
	public String getLocationCode () {
		return locationCode;
	}

	/**
	 * Set the value related to the column: locationcode
	 * @param locationCode the locationcode value
	 */
	public void setLocationCode (String locationCode) {
		this.locationCode = locationCode;
	}


	/**
	 * Return the value associated with the column: auditdate
	 */
	public Timestamp getAuditDate () {
		return auditDate;
	}

	/**
	 * Set the value related to the column: auditdate
	 * @param auditDate the auditdate value
	 */
	public void setAuditDate (Timestamp auditDate) {
		this.auditDate = auditDate;
	}


	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jkt.rms.business.base.BaseRateAuditTrans)) return false;
		else {
			com.jkt.rms.business.base.BaseRateAuditTrans mObj = (com.jkt.rms.business.base.BaseRateAuditTrans) obj;
			return (this.getId() == mObj.getId());
		}
	}


	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			return (int) this.getId();
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

}